﻿namespace RevitPluginTest;

[Transaction(TransactionMode.Manual)]
public class RevitTestFirstPlugin : IExternalCommand
{
    public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
    {
        TaskDialog.Show("Revit", "Hello Revit");
        Document doc = commandData.Application.ActiveUIDocument.Document;

        using (Transaction trans = new Transaction(doc))
        {
            trans.Start("绘制");

            trans.Commit();
        }

        return Result.Succeeded;
    }
}